﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Model_Layer
{
    [DataContract]
    [KnownType(typeof(Customer))]
    [KnownType(typeof(Passenger))]
    public class Person
    {
        private string fname;
        private string lname;
        private string paddress;
        private string dateOfBirth;
        private string gender;
        private bool ispassFlag, isCusFlag;

        public Person()
        { }

        public Person(string fname, string lname, string paddress, string dateOfBirth, string gender, bool ispassFlag, bool isCusFlag)
        {
            this.fname = fname;
            this.lname = lname;
            this.paddress = paddress;
            this.dateOfBirth = dateOfBirth;
            this.gender = gender;
            this.ispassFlag = ispassFlag;
            this.isCusFlag = isCusFlag;
        }

        [DataMember]
        public string Fname
        {
            get { return fname; }
            set { fname = value; }
        }

        [DataMember]
        public string Lname
        {
            get { return lname; }
            set { lname = value; }
        }

        [DataMember]
        public string Paddress
        {
            get { return paddress; }
            set { paddress = value; }
        }

        [DataMember]
        public string DateOfBirth
        {
            get { return dateOfBirth; }
            set { dateOfBirth = value; }
        }

        [DataMember]
        public string Gender
        {
            set;
            get;
        }

        [DataMember]
        public bool IsPassFlag
        {
            get { return ispassFlag; }
            set { ispassFlag = value; }
        }

        [DataMember]
        public bool IsCusFlag
        {
            get { return isCusFlag; }
            set { isCusFlag = value; }
        }
    }
}
